package com.ww.java8.fp.stream.onjava8.ch14;

import java.util.Arrays;

/**
 * Arrays类中含有一个名为stream()的静态方法用于把数组转换成为流。
 * 同样可以产生IntStream，LongStream和DoubleStream
 */
public class ArraysDemo01 {

    public static void main(String[] args) {
        Arrays.stream(new String[]{"hello", "world", "dream"}).forEach(System.out::println);

        Arrays.stream(new double[] {3.14159, 2.718, 0.618}).forEach(n -> System.out.format("%f ", n));
        System.out.println();
    }
}
